<!--
  描述：员工合同信息详情页
  @author tanghongjun
  @since 2020-05-14 10:48:18
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head th:include="common/common :: jscss">
    <title>新增或编辑员工合同信息</title>
</head>
<body>

<div class="layui-fluid">

    <blockquote class="layui-crumb">组织关系&nbsp;&nbsp;>
        <a lay-href="/mc/staff/list.action">员工管理</a>&nbsp;&nbsp;>&nbsp;
        <zmn th:text="${obj.staffName}"></zmn>&nbsp;&nbsp;>&nbsp;
        <zmn th:text="${(staffContract.contractId > 0) ? '修改员工合同信息' : '新增员工合同信息'}"></zmn>
    </blockquote>

    <div class="layui-card">
        <div th:replace="mc/staff/_tab::tab"></div>

        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <input type="hidden" name="contractId" th:value="${staffContract.contractId}"/>
            <input type="hidden" name="staffId" th:value="${staffContract.staffId}"/>

            <div class="layui-card-header" style="margin-top:10px;"><b>基本信息</b></div>
            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item">
                <label class="layui-form-label">首次合同签订时间</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="fristContractTime" id="fristContractTime"
                               th:value="${staffContract.fristContractTime}"
                               class="layui-input" placeholder="首次合同签订时间" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">合同期限</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="fristContractValidityPeriod"
                               th:value="${staffContract.fristContractValidityPeriod}" placeholder="合同期限"
                                autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">首次合同到期时间</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="fristContractEndTime" id="fristContractEndTime"
                               th:value="${staffContract.fristContractEndTime}"
                               class="layui-input" placeholder="首次合同到期时间" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">首次签订合同编号</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="fristContractNumber" th:value="${staffContract.fristContractNumber}"
                               placeholder="首次签订合同编号"
                                autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">现合同签订时间</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="contractTimeNow" id="contractTimeNow"
                               th:value="${staffContract.contractTimeNow}"
                               class="layui-input" placeholder="首次合同签订时间" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">合同期限</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="contractValidityPeriodNow"
                               th:value="${staffContract.contractValidityPeriodNow}" placeholder="合同期限"
                                autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">现合同到期时间</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="contractEndTimeNow" id="contractEndTimeNow"
                               th:value="${staffContract.contractEndTimeNow}"
                               class="layui-input" placeholder="合同到期时间" autocomplete="off"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">现签订合同编号</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="contractNumberNow" th:value="${staffContract.contractNumberNow}"
                               placeholder="现签订合同编号"
                                autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">合同续签次数</label>
                <div class="layui-input-block">
                    <div class="layui-input-inline">
                        <input type="text" name="contractTimes" th:value="${staffContract.contractTimes}"
                               placeholder="合同续签次数"
                                autocomplete="off" class="layui-input" maxlength="100"/>
                    </div>
                </div>
            </div>

            <zmn th:if="${staffContract.contractId > 0}">
                <div class="layui-card-header"><b>其他信息</b></div>
                <div class="layui-split">&nbsp;</div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">修改人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${staffContract.updater} + '&nbsp;/&nbsp;' + ${#dates.format(staffContract.updateTime, 'yyyy-MM-dd HH:mm:ss')}">
                            修改人/时间
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-xs">
                    <label class="layui-form-label">创建人/时间</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${staffContract.creater} + '&nbsp;/&nbsp;' + ${#dates.format(staffContract.createTime, 'yyyy-MM-dd HH:mm:ss')}">
                            创建人/时间
                        </div>
                    </div>
                </div>
            </zmn>

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block">
                    <div class="layui-footer" style="left: 0;">
<!--                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit"-->
<!--                                th:if="${#authPermit.checkPermit('/staff/staffcontract/addEdit.action')}">保存-->
                            <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存
                        </button>
                        <button class="layui-btn layui-btn-primary" id="cancleBtn">
                            取消
                        </button>
                    </div>
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        staffContract: [[${staffContract}]]
    };

    layui.config({
        base: "/static/lay/"
    }).extend({
        index: "lib/index",
        plat_staffcontract_detail: "staff/staffcontract/zmn.plat.staffcontract.detail",
    }).use(['index', 'plat_staffcontract_detail']);

</script>
</body>
</html>